//
//  SecondViewController.m
//  王宇先_09
//
//  Created by wyx on 16/3/21.
//  Copyright © 2016年 Apon. All rights reserved.
//

#import "SecondViewController.h"
#import "MyScrollView.h"
#import "Album.h"

@interface SecondViewController ()

@end

@implementation SecondViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navigationItem.title = @"第二页";
    self.view.backgroundColor = [UIColor yellowColor];
    [self createAlbum];
}
/** Date */
- (NSArray *)handleData {
    
    NSMutableArray *mArr = [NSMutableArray array];
    
    for (int i = 1; i < 5; i++) {
        
        NSString *name = [NSString stringWithFormat:@"%d.jpg", i];
        
        UIImage *image = [UIImage imageNamed:name];
        
        [mArr addObject:image];
    }
    return mArr;
}
- (void)createAlbum{
    
    Album *album = [[Album alloc] initWithFrame:self.view.bounds withImages:[self handleData]];
    [self.view addSubview:album];
    [album release];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
